package com.czk.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * @Author:ChenZhangKun
 * @Date: 2023/3/22 21:55
 */
public class FormatTimeAmAndPm {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a",Locale.ENGLISH);
        String str="03/10/2022 10:23:50 PM";
        Date date = sdf.parse(str);
        System.out.println(date);
    }
}
